-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-implement PR-AUC. #7297
Re-implement PR-AUC. #7297
Conversation
LTR support is added. No breaking change. |
Codecov Report
@@ Coverage Diff @@
## master #7297 +/- ##
=======================================
Coverage 83.62% 83.62%
=======================================
Files 13 13
Lines 3884 3884
=======================================
Hits 3248 3248
Misses 636 636 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I correct that you are trying to extract the scan and reduce phase of the AUC computation, but pass lambda functions to achieve the different variations in AUC (ROC-AUC vs PR-AUC, multiclass and ranking)?
This PR probably needs some performance testing on CPU and GPU.
if (!cache) { | ||
cache.reset(new DeviceAUCCache); | ||
} | ||
cache->Init(predts, is_multi, device); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to use its constructor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
init
can handle a changed input matrix.
Yes.
Will run some simple benchmarks. |
@RAMitchell I attached some benchmark results to the PR description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmarks look good, no regression for existing code.
I think I'm happy to go ahead with this, but more testing is always helpful, if you can figure out how to do it for PR-AUC.
* Support binary/multi-class classification, ranking. * Add documents. * Handle missing data.
Pushed a commit that prevents integer overflow inside cub for ROC-AUC. |
The new implementation supports binary/multi-class classification and learning to rank to binary relevance. Also, it handles empty datasets and irregular datasets by returning NaN instead of making an exception. Lastly, the GPU implementation has the same functionality as the CPU one instead of being ranking only.
n_samples = 1e7
runs = 16
n_classes = 8 (multi-class only)
Close #6561 .
Close #6272 .
Close #6551 .
Close #6692 .